package messageMeClient.client;

import messageMeClient.manager.PackageManager;
import messageMeClient.view.LoginDialog;
import messageMeClient.view.MainForm;
import messageMeClient.view.RegisterDialog;
import messageMeTransfer.connection.ClientConnection;
import messageMeTransfer.utilities.PackageWrapper;

public class Client {

	public static void main(String[] args) {
		
		ClientConnection connection = new ClientConnection();
		PackageWrapper packageWrapper = new PackageWrapper();
		
		MainForm mainForm = new MainForm(connection, packageWrapper);
		mainForm.frame.setVisible(true);

		LoginDialog dlg = new LoginDialog(connection, packageWrapper);
		dlg.setVisible(true);
		
		RegisterDialog dlg2 = new RegisterDialog(connection, packageWrapper);
		dlg2.setVisible(true);
		
		PackageManager packageManager = new PackageManager(mainForm, connection, packageWrapper);
		packageManager.start();	
	}
}